<div class="row-fluid">
    <div class="span12">
		<form class="form" method="post"  action="jsp/admin/rbac/DoSelectPermissions.jsp" name="add_control">
			<fieldset>
			<legend>#i18n{portal.rbac.select_permissions.titleSelectPermissions}
				<button class="btn btn-primary btn-small pull-right" type="submit" >
					<i class="icon-ok icon-white"></i>&nbsp;
					#i18n{portal.rbac.select_permissions.buttonLabelValidate}
				</button>
				<a class="btn btn-small pull-right spaced" href="jsp/admin/rbac/AddControlToRole.jsp?role_key=${role_key}&amp;resource_type=${resource_type}" >
					<i class="icon-remove-circle"></i>&nbsp;
					#i18n{portal.rbac.select_permissions.buttonLabelCancel}
				</a>
			</legend>
			<label class="radio inline"> #i18n{portal.rbac.select_permissions.labelSelectPermissionsFromList}
				<input class="radio" type="radio" name="select_permissions" value="choose" />
			</label>
			<label class="radio inline"> #i18n{portal.rbac.select_permissions.labelSelectAllPermissions}
				<input class="radio" type="radio" name="select_permissions" value="all" checked="checked" />
			</label>
			<blockquote>
			<#list permissions_list as item>
				<#if item.checked >
					<label class="checkbox">
						<input checked class="checkbox" onclick="document.add_control.select_permissions[0].checked=true;" type="checkbox" name="permission_key" value="${item.code}" /> ${item.name}
					</label>
				<#else>
					<label class="checkbox">
						<input class="checkbox" onclick="document.add_control.select_permissions[0].checked=true;" type="checkbox" name="permission_key" value="${item.code}" />
						${item.name}
					</label>
					</#if>
				</#list>
				<input type="hidden" name="role_key" value="${role_key}" />
				<input type="hidden" name="resource_type" value="${resource_type}" />
				<input type="hidden" name="select_resources" value="${select_resources}" />
				<#if resource_id_list?has_content>
					<#list resource_id_list as resource_id>
						<input type="hidden" name="resource_id" value="${resource_id}" />
					</#list>
				</#if>
				</blockquote>
			</fieldset>
		</form>
    </div>
</div>